<?php
	require_once( "functions/inc_systemFunctions.php" );
	page_header( "Wayne Schlegel Inc. | Product finder", true, "myflight" );
	if( empty( $_POST['location'] ) ){
		$_POST['location'] = "";
	}
?>

<?php
	showProductDetails( $_GET['pid'] );
?>

<table class="iTable">
	<tr class="moreInformation">
		<td><a href="product-showRoute.php?pid=<?=$_GET['pid']?>&backLink=<?=base64_encode( "product-showRoute.php?" . $_SERVER['QUERY_STRING'] )?>"><img src="images/icons/world.png" align="absmiddle" /> show route</a></td>
	</tr>
	<tr class="moreInformation">
		<td><a href="product-reviews.php?pid=<?=$_GET['pid']?>"><img src="images/icons/reviews.png" align="absmiddle" /> reviews</a></td>
	</tr>


	<tr class="moreInformation lastItem">
<?php
	if( productOnShoppingList( $_SESSION['user_id'], $_GET['pid'] ) === true ) {
	?>
		<td><a href="shopping-list.php?pid=<?=$_GET['pid']?>"><img src="images/icons/shoppingList.png" align="absmiddle" /> on your shopping-list</a></td>
	<?php
	} else {
	?>
		<td><a href="product-addToShoppingList.php?pid=<?=$_GET['pid']?>"><img src="images/icons/shoppingListAdd.png" align="absmiddle" /> add to shopping-list</a></td>
	<?php
	}
?>
	</tr>
</table>

<?php
	page_footer();
?>